import cv2 as cv
import FrameDeal as fd

cv.namedWindow('webcam')
webcam = cv.VideoCapture(0)
mf = fd.MatchFace()
while webcam.isOpened():
    res, frame = webcam.read()

    # 帧处理
    frame = mf.deal(frame)

    if res:
        frame = cv.flip(frame, 180)
        cv.imshow('webcam', frame)
        if cv.waitKey(1) & 0xFF == ord('q'):
            break
    else:
        break
webcam.release()
cv.destroyAllWindows()
